<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <a href="./05--test.html">test</a>
    <button>前进</button>
    <script>
        /*
        
            history 历史记录对象


        */
        window.history
        console.log(history);
        console.log(history.length);//当前窗口历史记录的个数

        var btn = document.querySelector('button');
        btn.onclick = function () {
            // 前进
            // history.forward()
            // 前进1页
            // history.go(1)

            //刷新当前页
            history.go(0);
            // location.reload()
        }
    </script>

</body>

</html>